68
|
I have a hierarchy and I need to filter only root items that match, with thier childs

with AxComboBox1 do
begin
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
FilterInclude := EXCOMBOBOXLib.FilterIncludeEnum.exRootsWithChilds;
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exFilter;
Filter := 'R1';
end;
with Items do
begin
h := AddItem('R1');
InsertItem(h,Nil,'C1');
InsertItem(h,Nil,'C2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Nil,'C1');
InsertItem(h,Nil,'C2');
end;
ApplyFilter();
end
|
66
|
I have a hierarchy and I need to filter only parent items that match, including thier childs

with AxComboBox1 do
begin
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
FilterInclude := EXCOMBOBOXLib.FilterIncludeEnum.exItemsWithChilds;
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exFilter;
Filter := 'R1';
end;
with Items do
begin
h := AddItem('R1');
InsertItem(h,Nil,'C1');
InsertItem(h,Nil,'C2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Nil,'C1');
InsertItem(h,Nil,'C2');
end;
ApplyFilter();
end
|
558
|
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

with AxComboBox1 do
begin
BeginUpdate();
AttachTemplate('handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}');
HeaderAppearance := EXCOMBOBOXLib.AppearanceEnum.Etched;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exAllLines;
GridLineStyle := EXCOMBOBOXLib.GridLinesStyleEnum.exGridLinesVSolid;
with Columns do
begin
Add('Item');
with (Add('Pos') as EXCOMBOBOXLib.Column) do
begin
Position := 0;
Width := 32;
AllowSizing := False;
FormatColumn := '1 index ``';
end;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
EndUpdate();
end
|
472
|
I cannot seem to get autosearch=1 (contains) in the column object to search properly. It still only finds items that start with the typed character. I want to it look to see if the typed character(s) are contained in the item. I Can't seem to get this to work

with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.DropDownList;
HeaderVisible := False;
AutoSearch := True;
AutoDropDown := True;
IntegralHeight := True;
(Columns.Add('Default') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exContains;
with Items do
begin
AddItem('This is a bit of text');
AddItem('This is a another text');
end;
EndUpdate();
end
|
94
|
I can't scroll to the end of the data. What can I do

with AxComboBox1 do
begin
ScrollBySingleLine := True;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exRowLines;
Columns.Add('Column');
with Items do
begin
ItemHeight[AddItem(TObject(0))] := 13;
end;
PutItems(GetItems(TObject(0)),Nil);
with Items do
begin
ItemHeight[AddItem(TObject(1))] := 26;
end;
PutItems(GetItems(TObject(0)),Nil);
with Items do
begin
ItemHeight[AddItem(TObject(2))] := 36;
end;
PutItems(GetItems(TObject(0)),Nil);
with Items do
begin
ItemHeight[AddItem(TObject(3))] := 48;
end;
PutItems(GetItems(TObject(0)),Nil);
end
|
469
|
I am using the ScrollWidth/ScrollHeight property on 0 to hide the control's scroll bars, the question is that the drop down button is disappearing. What can be done so I can still show the drop down button

with AxComboBox1 do
begin
BeginUpdate();
LabelHeight := 40;
ScrollWidth := 0;
ScrollHeight := 0;
DropDownButtonWidth := 40;
EndUpdate();
end
|
514
|
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines

with AxComboBox1 do
begin
BeginUpdate();
(Columns.Add('Item') as EXCOMBOBOXLib.Column).DisplayFilterButton := True;
with (Columns.Add('Pos') as EXCOMBOBOXLib.Column) do
begin
AllowSizing := False;
AllowSort := False;
Width := 32;
FormatColumn := '1 apos ``';
Position := 0;
end;
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
end;
FilterBarFont := (Font as stdole.StdFont);
FilterBarCaption := '`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value';
FilterBarPromptPattern := 'B';
FilterBarPromptVisible := Integer(EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarCompact) Or Integer(EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarSingleLine) Or Integer(EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarVisible) Or Integer(EXCOMBOBOXLib.FilterBarVisibleEnum.exFilterBarPromptVisible);
with Columns.Item[TObject(0)] do
begin
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exFilter;
Filter := 'Item A|Item B';
end;
ApplyFilter();
EndUpdate();
end
|
550
|
I am calling Value to change the selected value, but the selection is not visible, unless I scroll to it

with AxComboBox1 do
begin
BeginUpdate();
ColumnAutoResize := False;
rs := (ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset')) as ADODB.Recordset);
with rs do
begin
Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb',1,1,Nil);
end;
DataSource := (rs as ADODB.Recordset);
Value := TObject(10311);
with Items do
begin
EnsureVisibleItem(FocusItem);
end;
EndUpdate();
end
|
146
|
I've seen that you can change the visual appearance for the scroll bar. How can I do that

with AxComboBox1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
VisualAppearance.Add(3,'c:\exontrol\images\hot.ebn');
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exSBtn,$1000000);
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exSBtnP,$2000000);
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exSBtnH,$3000000);
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exHSBack,$f0f0f0);
set_Background(EXCOMBOBOXLib.BackgroundPartEnum.exVSBack,$f0f0f0);
set_Background(Integer(EXCOMBOBOXLib.BackgroundPartEnum.exScrollHoverAll) Or Integer(EXCOMBOBOXLib.BackgroundPartEnum.exDateScrollThumb),$f0f0f0);
(Columns.Add('S') as EXCOMBOBOXLib.Column).Width := 32;
(Columns.Add('Level 1') as EXCOMBOBOXLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 2') as EXCOMBOBOXLib.Column).LevelKey := TObject(1);
(Columns.Add('Level 3') as EXCOMBOBOXLib.Column).LevelKey := TObject(1);
(Columns.Add('E1') as EXCOMBOBOXLib.Column).Width := 32;
(Columns.Add('E2') as EXCOMBOBOXLib.Column).Width := 32;
(Columns.Add('E3') as EXCOMBOBOXLib.Column).Width := 32;
(Columns.Add('E4') as EXCOMBOBOXLib.Column).Width := 32;
ColumnAutoResize := False;
end
|
119
|
I've seen that the width of the tooltip is variable. Can I make it larger

with AxComboBox1 do
begin
ToolTipWidth := 328;
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip that should be very very very very very very very long';
end
|
2
|
I've added a single column, but it is displayed only on a part of the control. Is there something I can do so the column will be fully displayed on the control

with AxComboBox1 do
begin
Columns.Add('ColumnName');
Items.AddItem('Item 1');
Items.AddItem('Item 2');
end
|
473
|
How would you clear the displayed selection for style DropDownList. So if a user selects or searches a value in a style DropDownList, I want to know if I can reset the control back to an empty selection

// DropUp event - Occurs when the drop-down portion of the control is hidden.
procedure TWinForm1.AxComboBox1_DropUp(sender: System.Object; e: System.EventArgs);
begin
with AxComboBox1 do
begin
Value := '';
end
end;
// SelectionChanged event - Fired after a new item has been selected.
procedure TWinForm1.AxComboBox1_SelectionChanged(sender: System.Object; e: System.EventArgs);
begin
with AxComboBox1 do
begin
OutputDebugString( 'You selected: ' );
OutputDebugString( Value );
end
end;
with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.DropDownList;
HeaderVisible := False;
AutoSearch := True;
AutoDropDown := True;
IntegralHeight := True;
(Columns.Add('Default') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exContains;
with Items do
begin
AddItem('This is a bit of text');
AddItem('This is a another text');
DefaultItem := InsertItem(Nil,Nil,'');
ItemPosition[0] := 0;
SortableItem[0] := False;
end;
EndUpdate();
end
|
560
|
How I can programmatically select a row (with regular combobox I can set the ListIndex right up to Listcount -1)

with AxComboBox1 do
begin
BeginUpdate();
Columns.Add('Column');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
SelectItem[ItemByIndex[1]] := True;
end;
EndUpdate();
end
|
561
|
How I can programmatically select a row (method 2)

with AxComboBox1 do
begin
BeginUpdate();
Columns.Add('Column');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
Value := 'Item 2';
EndUpdate();
end
|
88
|
How do lock / fix some columns to the control, so I can see them all the time, event if I scroll the columns

with AxComboBox1 do
begin
CountLockedColumns := 1;
BackColorLock := Color.FromArgb(240,240,240);
ColumnAutoResize := False;
(Columns.Add('Locked') as EXCOMBOBOXLib.Column).Width := 128;
(Columns.Add('Un-Locked 1') as EXCOMBOBOXLib.Column).Width := 128;
(Columns.Add('Un-Locked 2') as EXCOMBOBOXLib.Column).Width := 128;
(Columns.Add('Un-Locked 3') as EXCOMBOBOXLib.Column).Width := 128;
with Items do
begin
CellCaption[TObject(AddItem('locked')),TObject(1)] := 'unlocked';
end;
end
|
299
|
How do I vertically align a cell

with AxComboBox1 do
begin
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exRowLines;
(Columns.Add('MultipleLine') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exCellSingleLine] := TObject(False);
Columns.Add('VAlign');
with Items do
begin
h := AddItem('This is a bit of long text that should break the line');
CellCaption[TObject(h),TObject(1)] := 'top';
CellVAlignment[TObject(h),TObject(1)] := EXCOMBOBOXLib.VAlignmentEnum.exTop;
h := AddItem('This is a bit of long text that should break the line');
CellCaption[TObject(h),TObject(1)] := 'middle';
CellVAlignment[TObject(h),TObject(1)] := EXCOMBOBOXLib.VAlignmentEnum.exMiddle;
h := AddItem('This is a bit of long text that should break the line');
CellCaption[TObject(h),TObject(1)] := 'bottom';
CellVAlignment[TObject(h),TObject(1)] := EXCOMBOBOXLib.VAlignmentEnum.exBottom;
end;
end
|
84
|
How do I use my own icons for my radio buttons

with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
set_RadioImage(False,1);
set_RadioImage(True,2);
(Columns.Add('Radio') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasRadioButton] := TObject(True);
with Items do
begin
AddItem('Radio 1');
CellState[TObject(AddItem('Radio 2')),TObject(0)] := 1;
AddItem('Radio 3');
end;
end
|
83
|
How do I use my own icons for checkbox cells

with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
set_CheckImage(EXCOMBOBOXLib.CheckStateEnum.Unchecked,1);
set_CheckImage(EXCOMBOBOXLib.CheckStateEnum.Checked,2);
(Columns.Add('Check') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
with Items do
begin
AddItem('Check 1');
CellState[TObject(AddItem('Check 2')),TObject(0)] := 1;
end;
end
|
479
|
How do I unselect/deselect the item (Simple style)
with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.Simple;
Columns.Add('Def');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 3');
end;
SearchColumnIndex := 0;
Value := 'Item 2';
with Items do
begin
SelectItem[FocusItem] := False;
end;
EndUpdate();
end
|
478
|
How do I unselect/deselect the item (DropDownList style)
with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.DropDown;
Columns.Add('Def');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 3');
end;
SearchColumnIndex := 0;
Value := 'Item 2';
with Items do
begin
SelectItem[FocusItem] := False;
end;
EndUpdate();
end
|
477
|
How do I unselect/deselect the item (DropDown style)
with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.DropDown;
Columns.Add('Def');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 3');
end;
SearchColumnIndex := 0;
Value := 'Item 2';
with Items do
begin
SelectItem[FocusItem] := False;
end;
EndUpdate();
end
|
288
|
How do I unselect an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
SelectItem[h] := False;
end;
end
|
155
|
How do I underline the numbers greater than a value

with AxComboBox1 do
begin
ConditionalFormats.Add('%0 >= 10',Nil).Underline := True;
Columns.Add('Numbers');
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
Items.AddItem(TObject(10));
Items.AddItem(TObject(20));
end
|
244
|
How do I underline an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
ItemUnderline[AddItem('underline')] := True;
end;
end
|
245
|
How do I underline a cell or an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
CellCaptionFormat[TObject(AddItem('gets <u>underline</u> only a portion of text')),TObject(0)] := EXCOMBOBOXLib.CaptionFormatEnum.exHTML;
end;
end
|
246
|
How do I underline a cell

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
CellUnderline[TObject(AddItem('underline')),TObject(0)] := True;
end;
end
|
325
|
How do I turn off the auto complete feature

with AxComboBox1 do
begin
AutoComplete := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
328
|
How do I specify the width of the drop down window

with AxComboBox1 do
begin
set_WidthList(Nil,100);
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
327
|
How do I specify the minimum width of the drop down window

with AxComboBox1 do
begin
MinWidthList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
329
|
How do I specify the minimum height of the drop down window

with AxComboBox1 do
begin
MinHeightList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
92
|
How do I specify the indentation of the child items relative to their parents

with AxComboBox1 do
begin
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
Indent := 11;
Columns.Add('Column');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Nil,'Child');
end;
end
|
330
|
How do I specify the height of the drop down window

with AxComboBox1 do
begin
set_HeightList(Nil,400);
MinWidthList := 100;
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
338
|
How do I specify the height of the control's label

with AxComboBox1 do
begin
LabelHeight := 34;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
93
|
How do I specify the column where the tree lines / hierarchy are shown

with AxComboBox1 do
begin
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
end
|
483
|
How do I sort the index column as numeric

// InsertItem event - Occurs after a new item has been inserted to Items collection.
procedure TWinForm1.AxComboBox1_InsertItem(sender: System.Object; e: AxEXCOMBOBOXLib._IComboBoxEvents_InsertItemEvent);
begin
with AxComboBox1 do
begin
with Items do
begin
CellData[TObject(e.item),TObject(1)] := TObject(ItemToIndex[e.item]);
end;
end
end;
with AxComboBox1 do
begin
BeginUpdate();
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exAllLines;
ColumnAutoResize := True;
ShowFocusRect := False;
SingleEdit := True;
with (Columns.Add('Next') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellPaddingLeft] := TObject(4);
Def[EXCOMBOBOXLib.DefColumnEnum.exHeaderPaddingLeft] := TObject(4);
end;
with (Columns.Add('Index') as EXCOMBOBOXLib.Column) do
begin
AllowSizing := False;
Width := 48;
FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
Def[EXCOMBOBOXLib.DefColumnEnum.exCellCaptionFormat] := TObject(1);
SortType := EXCOMBOBOXLib.SortTypeEnum.SortUserData;
Position := 0;
end;
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
AddItem('Item 5');
AddItem('Item 6');
AddItem('Item 7');
AddItem('Item 8');
AddItem('Item 9');
AddItem('Item 10');
end;
EndUpdate();
end
|
229
|
How do I sort the child items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
SortChildren(h,TObject(0),False);
end;
end
|
79
|
How do I sort descending a column, and put the sorting icon in the column's header

with AxComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
Columns.Item[TObject(0)].SortOrder := EXCOMBOBOXLib.SortOrderEnum.SortDescending;
end
|
78
|
How do I sort ascending a column, and put the sorting icon in the column's header

with AxComboBox1 do
begin
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
Columns.Item[TObject(0)].SortOrder := EXCOMBOBOXLib.SortOrderEnum.SortAscending;
end
|
72
|
How do I sort a column by numbers

with AxComboBox1 do
begin
(Columns.Add('desc') as EXCOMBOBOXLib.Column).SortType := EXCOMBOBOXLib.SortTypeEnum.SortNumeric;
with Items do
begin
AddItem(TObject(1));
AddItem(TObject(5));
AddItem(TObject(10));
SortChildren(0,TObject(0),False);
end;
end
|
116
|
How do I show the tooltip quicker

with AxComboBox1 do
begin
ToolTipDelay := 1;
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
181
|
How do I show or hide the sorting icons, but still need sorting

with AxComboBox1 do
begin
(Columns.Add('Sorted') as EXCOMBOBOXLib.Column).SortOrder := EXCOMBOBOXLib.SortOrderEnum.SortAscending;
Columns.Item[TObject(0)].DisplaySortIcon := False;
end
|
194
|
How do I show buttons for all cells in the column

with AxComboBox1 do
begin
with (Columns.Add('Button') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasButton] := TObject(True);
Def[EXCOMBOBOXLib.DefColumnEnum.exCellButtonAutoWidth] := TObject(True);
end;
Items.AddItem(' Button 1 ');
Items.AddItem(' Button 2 ');
end
|
193
|
How do I show buttons for all cells in the column

with AxComboBox1 do
begin
(Columns.Add('Button') as EXCOMBOBOXLib.Column).Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasButton] := TObject(True);
Items.AddItem(TObject(0));
Items.AddItem(TObject(1));
end
|
109
|
How do I show alternate rows in different background color

with AxComboBox1 do
begin
BackColorAlternate := Color.FromArgb(240,240,240);
Columns.Add('Column');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
AddItem('Item 5');
end;
end
|
559
|
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse.
procedure TWinForm1.AxComboBox1_MouseMoveEvent(sender: System.Object; e: AxEXCOMBOBOXLib._IComboBoxEvents_MouseMoveEvent);
begin
with AxComboBox1 do
begin
i := get_ItemFromPoint(-1,-1,c,hit);
OutputDebugString( i );
OutputDebugString( Items.ItemData[i] );
end
end;
with AxComboBox1 do
begin
BeginUpdate();
Columns.Add('Default');
with Items do
begin
ItemData[AddItem('method 1')] := 'your extra data of method 1';
InsertItem(0,'your extra data of method 2','method 2');
end;
with Items do
begin
DefaultItem := AddItem('method 3');
ItemData[0] := 'your extra data of method 3';
end;
EndUpdate();
end
|
286
|
How do I select an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
SelectItem[h] := True;
end;
end
|
347
|
How do I select a value

with AxComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
set_Select(TObject(1),'Root 1.2');
end
|
348
|
How do I select a value

with AxComboBox1 do
begin
IntegralHeight := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exGroupLinesAtRoot;
TreeColumnIndex := 1;
Columns.Add('Column 1');
Columns.Add('Column 2');
with Items do
begin
h := AddItem('Root 1.1');
CellCaption[TObject(h),TObject(1)] := 'Root 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 2.1')),TObject(1)] := 'Child 2.2';
ExpandItem[h] := True;
h := AddItem('Root 2.1');
CellCaption[TObject(h),TObject(1)] := 'Root 2.2';
CellCaption[TObject(InsertItem(h,Nil,'Child 1.1')),TObject(1)] := 'Child 1.2';
end;
Value := 'Root 1.1';
end
|
466
|
How do I select a NULL/empty value

with AxComboBox1 do
begin
BeginUpdate();
Style := EXCOMBOBOXLib.StyleEnum.DropDownList;
Columns.Add('Items');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
DefaultItem := InsertItem(Nil,Nil,'');
ItemPosition[0] := 0;
SortableItem[0] := False;
end;
Value := '';
EndUpdate();
end
|
114
|
How do I search case sensitive, using your incremental search feature

with AxComboBox1 do
begin
AutoSearch := True;
ASCIILower := '';
with Columns do
begin
(Add('exStartWith') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exStartWith;
(Add('exContains') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exContains;
end;
with Items do
begin
CellCaption[TObject(AddItem('text')),TObject(1)] := 'another text';
end;
with Items do
begin
CellCaption[TObject(AddItem('text')),TObject(1)] := 'another text';
end;
end
|
262
|
How do I retrieve the focused item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[FocusItem] := True;
end;
end
|
345
|
How do I remove the drop down's border

with AxComboBox1 do
begin
DropDownBorder := EXCOMBOBOXLib.AppearanceEnum.None2;
end
|
69
|
How do I remove the control's border

with AxComboBox1 do
begin
Appearance := EXCOMBOBOXLib.AppearanceEnum.None2;
end
|
451
|
How do I prevent scrolling the control's data after user does the sort

with AxComboBox1 do
begin
EnsureOnSort := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
PutItems(GetItems(TObject(0)),Nil);
PutItems(GetItems(TObject(0)),Nil);
PutItems(GetItems(TObject(0)),Nil);
Columns.Item[TObject(0)].SortOrder := EXCOMBOBOXLib.SortOrderEnum.SortAscending;
end
|
585
|
How do I prevent changing the cell's state ( check-box state )
// CellStateChanging event - Fired before cell's state is about to be changed.
procedure TWinForm1.AxComboBox1_CellStateChanging(sender: System.Object; e: AxEXCOMBOBOXLib._IComboBoxEvents_CellStateChangingEvent);
begin
with AxComboBox1 do
begin
with Items do
begin
e.newState := CellState[Nil,TObject(e.cell)];
end;
end
end;
with AxComboBox1 do
begin
BeginUpdate();
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
with (Columns.Add('P1') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
PartialCheck := True;
end;
with (Columns.Add('P2') as EXCOMBOBOXLib.Column) do
begin
Def[EXCOMBOBOXLib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
EndUpdate();
end
|
77
|
How do I perform my own/custom sort, using my extra strings

with AxComboBox1 do
begin
(Columns.Add('desc') as EXCOMBOBOXLib.Column).SortType := EXCOMBOBOXLib.SortTypeEnum.SortUserData;
with Items do
begin
CellData[TObject(AddItem('A')),TObject(0)] := 'C';
CellData[TObject(AddItem('B')),TObject(0)] := 'B';
CellData[TObject(AddItem('C')),TObject(0)] := 'A';
SortChildren(0,TObject(0),False);
end;
end
|
76
|
How do I perform my own/custom sort, using my extra numbers

with AxComboBox1 do
begin
(Columns.Add('desc') as EXCOMBOBOXLib.Column).SortType := EXCOMBOBOXLib.SortTypeEnum.SortUserData;
with Items do
begin
CellData[TObject(AddItem(TObject(0))),TObject(0)] := TObject(2);
CellData[TObject(AddItem(TObject(1))),TObject(0)] := TObject(1);
CellData[TObject(AddItem(TObject(2))),TObject(0)] := TObject(0);
SortChildren(0,TObject(0),False);
end;
end
|
82
|
How do I perform my own sorting when user clicks the column's header

with AxComboBox1 do
begin
SortOnClick := EXCOMBOBOXLib.SortOnClickEnum.exUserSort;
Columns.Add('Column');
Items.AddItem('Item 1');
Items.AddItem('Item 2');
end
|
334
|
How do I lock or make read-only the control

with AxComboBox1 do
begin
Locked := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
331
|
How do I let user to resize the drop down window, at runtime

with AxComboBox1 do
begin
AllowSizeGrip := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
332
|
How do I let user to resize only the width of the drop down window, at runtime

with AxComboBox1 do
begin
AllowSizeGrip := True;
AllowVResize := False;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
333
|
How do I let user to resize only the height of the drop down window, at runtime

with AxComboBox1 do
begin
AllowSizeGrip := True;
AllowHResize := False;
MinWidthList := 100;
MinHeightList := 100;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
end
|
117
|
How do I let the tooltip being displayed longer

with AxComboBox1 do
begin
ToolTipPopDelay := 10000;
(Columns.Add('tootip') as EXCOMBOBOXLib.Column).ToolTip := 'this is a tooltip assigned to a column';
end
|
153
|
How do I highlight in italic the numbers greater than a value

with AxComboBox1 do
begin
ConditionalFormats.Add('%0 >= 10',Nil).Italic := True;
Columns.Add('Numbers');
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
Items.AddItem(TObject(10));
Items.AddItem(TObject(20));
end
|
154
|
How do I highlight in italic the numbers greater than a value

with AxComboBox1 do
begin
ConditionalFormats.Add('%0 >= 10',Nil).StrikeOut := True;
Columns.Add('Numbers');
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
Items.AddItem(TObject(10));
Items.AddItem(TObject(20));
end
|
152
|
How do I highlight in bold the numbers greater than a value

with AxComboBox1 do
begin
ConditionalFormats.Add('%0 >= 10',Nil).Bold := True;
Columns.Add('Numbers');
Items.AddItem(TObject(1));
Items.AddItem(TObject(2));
Items.AddItem(TObject(10));
Items.AddItem(TObject(20));
end
|
71
|
How do I hide the control's header bar

with AxComboBox1 do
begin
HeaderVisible := False;
end
|
258
|
How do I get the parent item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemParent[ItemChild[h]]] := True;
end;
end
|
232
|
How do I get the number or count of items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
with Items do
begin
AddItem(TObject(ItemCount));
end;
end
|
261
|
How do I get the number or count of child items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
AddItem(TObject(ChildCount[h]));
end;
end
|
339
|
How do I get the handle of the drop down window

with AxComboBox1 do
begin
Columns.Add(AxComboBox1.hWndDropDown);
end
|
263
|
How do I get the handle of the cell

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
CellBold[Nil,TObject(ItemCell[h,TObject(0)])] := True;
end;
end
|
257
|
How do I get the first child item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemChild[h]] := True;
end;
end
|
486
|
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

with AxComboBox1 do
begin
BeginUpdate();
with (Columns.Add('Date') as EXCOMBOBOXLib.Column) do
begin
SortType := EXCOMBOBOXLib.SortTypeEnum.SortDate;
DisplayFilterButton := True;
DisplayFilterPattern := False;
DisplayFilterDate := True;
FilterList := Integer(EXCOMBOBOXLib.FilterListEnum.exShowFocusItem) Or Integer(EXCOMBOBOXLib.FilterListEnum.exShowCheckBox) Or Integer(EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc);
end;
with (Columns.Add('DateTime') as EXCOMBOBOXLib.Column) do
begin
SortType := EXCOMBOBOXLib.SortTypeEnum.SortDateTime;
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXCOMBOBOXLib.FilterListEnum.exShowFocusItem) Or Integer(EXCOMBOBOXLib.FilterListEnum.exShowCheckBox) Or Integer(EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc);
end;
with (Columns.Add('Time') as EXCOMBOBOXLib.Column) do
begin
SortType := EXCOMBOBOXLib.SortTypeEnum.SortTime;
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXCOMBOBOXLib.FilterListEnum.exShowFocusItem) Or Integer(EXCOMBOBOXLib.FilterListEnum.exShowCheckBox) Or Integer(EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc);
FormatColumn := 'time(value)';
end;
with (Columns.Add('Numeric') as EXCOMBOBOXLib.Column) do
begin
SortType := EXCOMBOBOXLib.SortTypeEnum.SortNumeric;
DisplayFilterButton := True;
FilterList := Integer(EXCOMBOBOXLib.FilterListEnum.exShowFocusItem) Or Integer(EXCOMBOBOXLib.FilterListEnum.exShowCheckBox) Or Integer(EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc);
end;
with (Columns.Add('String') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterList := Integer(EXCOMBOBOXLib.FilterListEnum.exShowFocusItem) Or Integer(EXCOMBOBOXLib.FilterListEnum.exShowCheckBox) Or Integer(EXCOMBOBOXLib.FilterListEnum.exSortItemsDesc);
end;
with Items do
begin
h := AddItem('1/27/2010');
CellCaption[TObject(h),TObject(1)] := '1/27/2010 10:00:00 AM';
CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
CellCaption[TObject(h),TObject(3)] := TObject(1);
CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
h := AddItem('1/27/2011');
CellCaption[TObject(h),TObject(1)] := '1/27/2011 9:00:00 AM';
CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
CellCaption[TObject(h),TObject(3)] := TObject(11);
CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
h := AddItem('11/2/2010');
CellCaption[TObject(h),TObject(1)] := '11/2/2010 9:00:00 AM';
CellCaption[TObject(h),TObject(2)] := CellCaption[TObject(h),TObject(1)];
CellCaption[TObject(h),TObject(3)] := TObject(2);
CellCaption[TObject(h),TObject(4)] := CellCaption[TObject(h),TObject(3)];
end;
Columns.Item['DateTime'].DisplayFilterDate := False;
EndUpdate();
end
|
96
|
How do I get ride of the rectangle arround focused item

with AxComboBox1 do
begin
ShowFocusRect := False;
Columns.Add('Column');
Items.AddItem(TObject(0));
Items.AddItem(TObject(1));
end
|
470
|
How do I get notified once the user changes the Filter For field
// EditChange event - Fired when the user has taken an action that may have altered text in an edit control.
procedure TWinForm1.AxComboBox1_EditChange(sender: System.Object; e: AxEXCOMBOBOXLib._IComboBoxEvents_EditChangeEvent);
begin
with AxComboBox1 do
begin
OutputDebugString( 'ColIndex: ' );
OutputDebugString( e.colIndex );
OutputDebugString( 'Label: ' );
OutputDebugString( get_EditText(TObject(0)) );
OutputDebugString( 'FilterFor: ' );
OutputDebugString( get_EditText(TObject(-1)) );
end
end;
with AxComboBox1 do
begin
BeginUpdate();
FilterForVisible := True;
FilterForBackColor := Color.FromArgb(240,240,240);
IntegralHeight := True;
Columns.Add('Default');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
AddItem('Item 4');
AddItem('Item 5');
end;
EndUpdate();
end
|
547
|
How do I get a list of interfaces the object implemenets

with AxComboBox1 do
begin
BeginUpdate();
ColumnAutoResize := False;
with (ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120')) as DAO.PrivDBEngine) do
begin
rs := (OpenDatabase('C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb',Nil,Nil,Nil).OpenRecordset('Orders',Nil,Nil,Nil) as DAO.Recordset2);
end;
OutputDebugString( (ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.PropertiesList')) as EXPROPERTIESLISTLib.PropertiesList).Interfaces[rs] );
DataSource := (rs as DAO.Recordset2);
Value := TObject(10248);
EndUpdate();
end
|
287
|
How do I find the selected item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
SelectItem[h] := True;
ItemBold[SelectedItem[0]] := True;
end;
end
|
294
|
How do I find the index of the item based on its handle

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemByIndex[ItemToIndex[h]]] := True;
end;
end
|
293
|
How do I find the handle of the item based on its index

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[ItemByIndex[1]] := True;
end;
end
|
297
|
How do I find an item based on a path

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
ItemData[InsertItem(h,Nil,'Child 2')] := TObject(1234);
ExpandItem[h] := True;
ItemBold[FindPath['Root 1\Child 1']] := True;
end;
end
|
296
|
How do I find an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
ItemBold[FindItem['Child 2',TObject(0),Nil]] := True;
end;
end
|
107
|
How do I filter programatically the control

with AxComboBox1 do
begin
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exPattern;
Filter := 'Item*';
end;
Items.AddItem('Item 1');
Items.AddItem('');
Items.AddItem('Item 2');
ApplyFilter();
end
|
63
|
How do I filter for items that match exactly the specified string

with AxComboBox1 do
begin
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterType := EXCOMBOBOXLib.FilterTypeEnum.exFilter;
Filter := 'Item 1';
end;
Items.AddItem('Item 1');
Items.AddItem('Item 2');
Items.AddItem('Item 3');
ApplyFilter();
end
|
234
|
How do I expand or collapse an item

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
end;
end
|
123
|
How do I expand automatically the items while user types characters to searching for something ( incremental searching )

with AxComboBox1 do
begin
ExpandOnSearch := True;
LinesAtRoot := EXCOMBOBOXLib.LinesAtRootEnum.exLinesAtRoot;
AutoSearch := True;
(Columns.Add('Column') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exContains;
with Items do
begin
InsertItem(InsertItem(AddItem('text'),Nil,'some text'),Nil,'another text');
InsertItem(InsertItem(AddItem('text'),Nil,'some text'),Nil,'another text');
end;
end
|
260
|
How do I enumerate the visible items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
ItemBold[FirstVisibleItem] := True;
ItemBold[NextVisibleItem[FirstVisibleItem]] := True;
end;
end
|
259
|
How do I enumerate the siblings items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
ItemBold[NextSiblingItem[FirstVisibleItem]] := True;
ItemBold[PrevSiblingItem[NextSiblingItem[FirstVisibleItem]]] := True;
end;
end
|
256
|
How do I enumerate the root items

with AxComboBox1 do
begin
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Nil,'Child 1');
InsertItem(h,Nil,'Child 2');
ItemBold[RootItem[0]] := True;
ItemUnderline[RootItem[1]] := True;
end;
end
|
40
|
How do I ensure that the focused item is visible, after the user does the sort

with AxComboBox1 do
begin
EnsureOnSort := True;
Columns.Add('Column');
with Items do
begin
AddItem('Item 3');
AddItem('Item 1');
AddItem('Item 2');
end;
PutItems(GetItems(TObject(0)),Nil);
PutItems(GetItems(TObject(0)),Nil);
PutItems(GetItems(TObject(0)),Nil);
Columns.Item[TObject(0)].SortOrder := EXCOMBOBOXLib.SortOrderEnum.SortAscending;
end
|
108
|
How do I enlarge the drop down filter window

with AxComboBox1 do
begin
FilterBarDropDownHeight := '-320';
with (Columns.Add('Column') as EXCOMBOBOXLib.Column) do
begin
DisplayFilterButton := True;
FilterBarDropDownWidth := '-320';
end;
Items.AddItem('Item 1');
Items.AddItem('Item 2');
end
|
165
|
How do I enlarge or change the size of the control's scrollbars

with AxComboBox1 do
begin
ScrollHeight := 18;
ScrollWidth := 18;
ScrollButtonWidth := 18;
ScrollButtonHeight := 18;
end
|
112
|
How do I enable the incremental search feature within a column

with AxComboBox1 do
begin
AutoSearch := True;
with Columns do
begin
(Add('exStartWith') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exStartWith;
(Add('exContains') as EXCOMBOBOXLib.Column).AutoSearch := EXCOMBOBOXLib.AutoSearchEnum.exContains;
end;
with Items do
begin
CellCaption[TObject(AddItem('text')),TObject(1)] := 'another text';
end;
with Items do
begin
CellCaption[TObject(AddItem('text')),TObject(1)] := 'another text';
end;
end
|
138
|
How do I enable resizing the columns at runtime

with AxComboBox1 do
begin
ColumnsAllowSizing := True;
MarkSearchColumn := False;
HeaderVisible := False;
Columns.Add('Column 1');
Columns.Add('Column 2');
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exVLines;
with Items do
begin
CellCaption[TObject(AddItem('Item 1')),TObject(1)] := 'Sub Item 1';
end;
with Items do
begin
CellCaption[TObject(AddItem('Item 2')),TObject(1)] := 'Sub Item 2';
end;
end
|
351
|
How do I enable resizing all the items at runtime

with AxComboBox1 do
begin
ItemsAllowSizing := EXCOMBOBOXLib.ItemsAllowSizingEnum.exResizeAllItems;
DrawGridLines := EXCOMBOBOXLib.GridLinesEnum.exHLines;
Columns.Add('Column');
Items.AddItem('Item 1');
with Items do
begin
ItemHeight[AddItem('Item 2')] := 48;
end;
Items.AddItem('Item 3');
end
|
137
|
How do I enable resizing ( changing the height ) the items at runtime

with AxComboBox1 do
begin
ItemsAllowSizing := EXCOMBOBOXLib.ItemsAllowSizingEnum.exResizeItem;
ScrollBySingleLine := True;
Columns.Add('Column');
Items.AddItem('Item 1');
with Items do
begin
ItemHeight[AddItem('Item 2')] := 48;
end;
Items.AddItem('Item 3');
end
|
180
|
How do I enable or disable the entire column

with AxComboBox1 do
begin
Columns.Add('C1');
(Columns.Add('Disabled') as EXCOMBOBOXLib.Column).Enabled := False;
with Items do
begin
CellCaption[TObject(AddItem(TObject(0))),TObject(1)] := '0.1';
end;
with Items do
begin
CellCaption[TObject(AddItem(TObject(1))),TObject(1)] := '1.1';
end;
end
|
268
|
How do I enable or disable a cell

with AxComboBox1 do
begin
Columns.Add('C1');
Columns.Add('C2');
with Items do
begin
h := AddItem('Cell 1');
CellCaption[TObject(h),TObject(1)] := 'Cell 2';
CellEnabled[TObject(h),TObject(1)] := False;
end;
end
|
553
|
How do I display the position of the item with 0-padding

with AxComboBox1 do
begin
BeginUpdate();
(Columns.Add('Items') as EXCOMBOBOXLib.Column).FormatColumn := '((1 apos ``) lpad `00`) + `. ` + value';
with Items do
begin
AddItem('Item A');
AddItem('Item B');
AddItem('Item C');
AddItem('Item D');
end;
EndUpdate();
end
|
349
|
How do I display the icons being selected in the control's label

with AxComboBox1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Columns.Add('Column');
with Items do
begin
CellImage[TObject(AddItem('Image 1')),TObject(0)] := 1;
CellImage[TObject(AddItem('Image 2')),TObject(0)] := 2;
CellImage[TObject(AddItem('Image 3')),TObject(0)] := 3;
end;
set_AssignEditImageOnSelect(0,True);
Value := 'Image 2';
end
|